/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mongoosehome.web.login.dao;

import com.mongoosehome.web.common.domain.TMemberRank;
import java.util.List;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

/**
 *
 * @author Administrator
 */
public class MemberRankDaoImpl extends HibernateDaoSupport implements MemberRankDao{

    @Override
    public void saveMemberRank(TMemberRank memberRank) {
        this.getHibernateTemplate().save(memberRank);
    }

    @Override
    @SuppressWarnings("unchecked")
    public List<TMemberRank> getAllMemberRanks() {
      return this.getHibernateTemplate().find("from TMemberRank");
    }

    @Override
    public TMemberRank getMemberRankById(int id) {
        return (TMemberRank) this.getHibernateTemplate().get(TMemberRank.class, id);
    }
}
